#include <iostream>
using std::cout;
using std::endl;

class Bar{
public:
    void test0(){ cout << "Bar::test0()" << endl; }
    void test1(int x){ cout << "Bar::test1(): " << x << endl; }
    void test2(){ cout << "Bar::test2(): " << _data << endl; }
    static void test3(){cout << _num << endl;}

    int _data = 10;
    static int _num;
};
int Bar::_num = 0;

void test0(){
    /* Bar ba; */
    /* Bar * fp = &ba; */

    Bar * fp = nullptr;
    fp->test0();//ok
    fp->test1(3);//ok
    /* fp->test2(); //error */
    fp->test3();
}

int main(void){
    test0();
    return 0;
}
